import java.io.*;
import java.util.*;

import javax.persistence.*;

@Entity
public class Vendeur extends Utilisateur{
    
    @ManyToOne(optional = false, fetch = FetchType.EAGER)  
    private Agence agence;
    
    @OneToMany(mappedBy="commande",fetch = FetchType.LAZY)  
    private Set<Facture> factures = new HashSet<Facture>();
   
    @OneToMany(fetch = FetchType.LAZY)
    @JoinColumn(name = "vendeur_id")
    private Set<Client> clients = new HashSet<Client>();    
    
    public Vendeur() {}

	public void setAgence(Agence agence) {
		this.agence = agence;
	}
  
}
